package com.nightsoul.easypoi.test.entity;

import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
/**
 * 课程实体
 * @author zj
 *
 */
public class Course {
	private String id;
	@Excel(name = "课程名称", orderNum = "1", width = 25, needMerge=true)
	private String name;
	/** 老师主键 */
    @ExcelEntity(id = "absent")
	private Teacher teacher;
    @ExcelCollection(name = "学生", orderNum = "4")
	private List<Student> students;



	public Course() {
	}
	public Course(String id, String name, Teacher teacher, List<Student> students) {
		this.id = id;
		this.name = name;
		this.teacher = teacher;
		this.students = students;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Teacher getTeacher() {
		return teacher;
	}
	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}
	public List<Student> getStudents() {
		return students;
	}
	public void setStudents(List<Student> students) {
		this.students = students;
	}
	@Override
	public String toString() {
		return "Course [id=" + id + ", name=" + name + ", teacher=" + teacher + ", students=" + students + "]";
	}


}
